--- a/third_party/waf/waflib/Tools/python.py
+++ b/third_party/waf/waflib/Tools/python.py
@@ -328,7 +328,7 @@ def check_python_headers(conf, features='pyembed pyext'):
 	x = 'MACOSX_DEPLOYMENT_TARGET'
 	if dct[x]:
 		env[x] = conf.environ[x] = str(dct[x])
-	env.pyext_PATTERN = '%s' + (dct['EXT_SUFFIX'] or dct['SO']) # SO is deprecated in 3.5 and removed in 3.11
+	env.pyext_PATTERN = '%s' + '.so' # SO is deprecated in 3.5 and removed in 3.11
 
 
 	# Try to get pythonX.Y-config
